package user_news

import (
	"HeadLineNews/proto_models/common"
	"HeadLineNews/utils"
	"github.com/gin-gonic/gin"
)

type Ctx interface {
	ParseParamUserListNews(c *gin.Context) (p *common.PageSize, err error)
}

type ctx struct {
}

func NewCtx() Ctx {
	return &ctx{}
}

// ParseParamUserListNews 解析用户请求新闻目录的参数
func (ctx *ctx) ParseParamUserListNews(c *gin.Context) (p *common.PageSize, err error) {
	p = new(common.PageSize)
	err = utils.ShouldBindProtobuf(c, p)
	return
}
